﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace vbReturn.classes
{
    public class clsRGAUploadHeader
    {

        private string sReturnID;

        public string SReturnID
        {
            get { return sReturnID; }
            set { sReturnID = value; }
        }
        
        private string sReceiptKey;

        public string SReceiptKey
        {
            get { return sReceiptKey; }
            set { sReceiptKey = value; }
        }

        private string sASNType;

        public string SASNType
        {
            get { return sASNType; }
            set { sASNType = value; }
        }

        private string sWarehouseRef;

        public string SWarehouseRef
        {
            get { return sWarehouseRef; }
            set { sWarehouseRef = value; }
        }

        private string sCarrierKey;

        public string SCarrierKey
        {
            get { return sCarrierKey; }
            set { sCarrierKey = value; }
        }

        public clsRGAUploadHeader()
        {
            sReceiptKey = null;
        }

        public clsRGAUploadHeader(string sRecKey)
        {
            this.sReceiptKey = sRecKey;
            this.clsRGADetail_List = new List<clsRGAUploadDetail>();
        }
       
        List<clsRGAUploadDetail> clsRGADetail_List;

        public void addRGADetail(clsRGAUploadDetail clsInputRGA)
        {
            this.clsRGADetail_List.Add(clsInputRGA);
        }

        public clsRGAUploadDetail getRGALineByIndex(int i)
        {
            return this.clsRGADetail_List[i];
        }

        public int getNoOfDetailLines()
        {
            return this.clsRGADetail_List.Count();
        }

        public bool gotRecord()
        {
            if (this.sReceiptKey == null)
            {
                return false;
            }

            return true;
        }
 

    }
}
